import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询岗位列表
export function listMagor(query) {
  return request({
    url: '/magor/magorlist/list',
    method: 'get',
    params: query
  })
}

// 查询岗位详细
export function getMagor(magId) {
  return request({
    url: '/magor/magorlist/' + magId,
    method: 'get'
  })
}

export function getMagorlist() {
  return request({
    url: '/magor/magorlist/',
    method: 'get'
  })
}

// 新增岗位
export function addMagor(data) {
  return request({
    url: '/magor/magorlist',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updateMagor(data) {
  return request({
    url: '/magor/magorlist',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delMagor(magId) {
  return request({
    url: '/magor/magorlist/' + magId,
    method: 'delete'
  })
}
